Skip to content

[Docs] Templates - Ascending navigation update#5653

Merged
halocline merged 29 commits intomasterfrom
docs-ascending-navigation-update
Feb 12, 2026
Merged

[Docs] Templates - Ascending navigation update#5653
halocline merged 29 commits intomasterfrom
docs-ascending-navigation-update

Conversation

@SeamusLeonardHPE
Copy link
Collaborator

@SeamusLeonardHPE SeamusLeonardHPE commented Dec 12, 2025

https://deploy-preview-5653--keen-mayer-a86c8b.netlify.app/templates/ascending-navigation

What does this PR do?

replaces 2 static image examples with an interactive demo of ascending navigation functionality

image

What are the relevant issues?

Closes #5725

Files modified

templates.js
Updated description to for clarity and to avoid duplication of phrasing on the page

AscendingNavigationAnatomy.js
Removed

AscendingNavigationExample.js
Added demo with interactions between page & parent link

ascending-navigation.mdx

  • Removed previous static examples
  • Added interactive example
  • Update guidance to remove mentions of "default button' styling
  • Improved guidance and when to use sections.

Note that during the site rebuild i think this content should be moved into the PageHeader as a configuration section.

Added interactive example file.
Updated page copy & structure.
Updated copy on pageheading/card via templates.js
Updated example file.
Update written guiguidance on Julias feedback
@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

⚠️ No Changeset found

Latest commit: 92c2cc9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for hpe-theme-preview ready!

Name Link
🔨 Latest commit 92c2cc9
🔍 Latest deploy log https://app.netlify.com/projects/hpe-theme-preview/deploys/698e277590f60f0009141865
😎 Deploy Preview https://deploy-preview-5653--hpe-theme-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for hpe-design-icons-grommet ready!

Name Link
🔨 Latest commit 92c2cc9
🔍 Latest deploy log https://app.netlify.com/projects/hpe-design-icons-grommet/deploys/698e2775a077b40008081771
😎 Deploy Preview https://deploy-preview-5653--hpe-design-icons-grommet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for unrivaled-bublanina-3a9bae ready!

Name Link
🔨 Latest commit 92c2cc9
🔍 Latest deploy log https://app.netlify.com/projects/unrivaled-bublanina-3a9bae/deploys/698e27755ad63b0008a22667
😎 Deploy Preview https://deploy-preview-5653--unrivaled-bublanina-3a9bae.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@julauxen julauxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my side. Ready for devs to review

@britt6612
Copy link
Collaborator

Is this an actual example of showing the cards with the arrows? I've just never seen us use Cards this way.

Screenshot 2025-12-12 at 11 32 47 AM

@britt6612
Copy link
Collaborator

@SeamusLeonardHPE I rearranged some code to be a little cleaner. I will be off Monday however I was thinking if @sulaymon-tajudeen-hpe also has time to walk you through some of the changes if not we can go through next week.

@MikeKingdom
Copy link
Collaborator

Is this an actual example of showing the cards with the arrows? I've just never seen us use Cards this way.

A card with an arrow is used in some real partner apps. Is that the question?

@britt6612
Copy link
Collaborator

Is this an actual example of showing the cards with the arrows? I've just never seen us use Cards this way.

A card with an arrow is used in some real partner apps. Is that the question?

yes it was a question. I guess I have not seen this use of Card even on our Card page example so wasnt sure.

Comment on lines +43 to +48
<Text weight="bold">To create this demo application:</Text>
<Paragraph margin="none">1. Create a React sandbox.</Paragraph>
<Paragraph margin="none">
2. Install <code>grommet</code>, <code>grommet-theme-hpe</code>,{' '}
<code>@hpe-design/icons-grommet</code>.
</Paragraph>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here (e.g. <ol><li> or Markdown would be better.) I wondering if this is important to help the screen readers

@SeamusLeonardHPE
Copy link
Collaborator Author

SeamusLeonardHPE commented Dec 16, 2025

Is this an actual example of showing the cards with the arrows? I've just never seen us use Cards this way.

Screenshot 2025-12-12 at 11 32 47 AM

@britt6612 Being used in Cillian's explorations of page templates
https://www.figma.com/design/tdVRcdCdBIETjXwQEr3gLk/Examples-Library-Construction-Site?node-id=348-69317&t=3WWm3iXvMLlO4SsU-4

Added new line to Index

Placed example content inside markdown.
Removed Nav in header (feedback form show & tell)
@britt6612 britt6612 requested review from halocline and removed request for britt6612 January 15, 2026 19:48
@SeamusLeonardHPE
Copy link
Collaborator Author

@halocline tagging to request final review. Thanks

Copy link
Collaborator

@halocline halocline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The end result of the example is quite nice. That said, we need to clean up the execution for how we achieve that result. I'd like to reduce implementation complexity while increasing readability, maintainability, and keep and mind that we are serving as reference examples -- people will copy and paste whatever we do.

Comment on lines +34 to +38
<PageHeader
parent={ <Anchor label="Home" icon={<Left />} a11yTitle="Link to the home page" />}
title="Example page title"
subtitle="I'm a direct child of the homepage"
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why we are deviating from the form factor / pattern for our typical example containers and showing code inline vs. "show example code"? Is this an intentional deviation? If so, what's the rationale?

I'd think we'd be making use of <Example />'s code prop.

Screenshot 2026-01-22 at 2 15 11 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to connect with @britt6612 to help me learn how to add raw code urls via code prop

<AscendingNavigationExample />
</Example>

```txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to display this code sample inline, this should be jsx not txt.

Suggested change
```txt
```jsx

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to jsx

1. A preview of Users detail view (child page).
1. Page loads on <strong>Overview</strong> child page
</Text>
<br></br>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using caption (which renders in the DOM as a figcaption) appropriately here? It seems like we are trying to describe the experience/interaction behavior vs. the figcaption "describing the rest of the contents of its parent

element."

I'd expect a figcaption to read "Example demonstrating how an "ascending navigation" anchor allows a user to navigate from a child page to its parent."

I'm not sure the "1. Page loads on Overview child page" and "2. Interacting with the Ascending Navigation link brings the user to the home page" adds much value -- can likely be eliminated. If we do think describing these interactions is needed, this should probably be placed in line with the preceding paragraph.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

};

return (
<Grommet theme={hpe}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not have a Grommet wrapper here.

Suggested change
<Grommet theme={hpe}>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines +61 to +66
<Box
background="background-back"
width="full"
border={{ color: 'border-weak', size: 'xsmall' }}
pad={{ bottom: 'xlarge' }}
>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are re-creating how "Example containers" are displayed within the site and creating fragmentation, additional deviation and overhead. Why not just use the Example container's properties for consistency?

Suggested change
<Box
background="background-back"
width="full"
border={{ color: 'border-weak', size: 'xsmall' }}
pad={{ bottom: 'xlarge' }}
>
<>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced custom box container with example.

>
<Button
default
icon={<Home />}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screen reader will read out both "Go to Home page" and the icon's aria-label "Home". Which is redundant and confusing. Need to suppress the latter.

Suggested change
icon={<Home />}
icon={<Home aria-hidden="true" />}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

default
icon={<Home />}
onClick={() => setActiveSection('home')}
hoverIndicator="background"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary.

Suggested change
hoverIndicator="background"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

import { sectionConfig } from './data/sections';

export const AscendingNavigationExample = () => {
const [activeSection, setActiveSection] = useState('overview');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These represent pages, not sections. For clarity variable names should align to what they represent.

Comment applies to references of "section" throughout.

Suggested change
const [activeSection, setActiveSection] = useState('overview');
const [activePage, setActivePage] = useState('overview');

export const AscendingNavigationExample = () => {
const [activeSection, setActiveSection] = useState('overview');

const config = sectionConfig[activeSection];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this a configuration or the pages content?

Suggested change
const config = sectionConfig[activeSection];
const page = pageContent[activePage];

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -0,0 +1,17 @@
import { Announce, Help, Template } from '@hpe-design/icons-grommet';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really a fan of this pattern here because it is harder to read and takes a lot of effort to follow. For clarity and flexibility, I'd rather follow the pattern you use in HomeContent.js. Similarly create OverviewContent.js, Components.js, Help.js and eliminate the whole config concept.

Instead you can replace all of that with:

const [activePage, setActivePage] = useContext('home');

const pageContent = {
  home: <HomeContent />,
  overview: <OverviewContent />,
  components: <ComponentsContent />,
  help: <HelpContent />
};


....

<>
  {pageContent[activePage]}
<>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved into separate pages and named PageOne, PageTwo... etc so we can update to any content.

Copy link
Collaborator

@julauxen julauxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visuals and content are looking good. Ready for dev review

render: datum => (
<Box direction="row" gap="small" align="center">
<Avatar background="brand" size="small">
{datum.initials}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the initials wont pass accessibility we need to use

   <Text size="large" color="text-strong">
        JS
      </Text>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the BG color and font size, passed acessibiity test in chrome

<Avatar background="dark-2" size="small"> <Text size="medium" color="text-strong">{datum.initials}</Text> </Avatar>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeamusLeonardHPE sorry but can we use background="decorative-green" to match our other examples for Avatar and I think we are recommending using decorative-green

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to
1- color decorative-green
2- Size medium
3- Removed text size prop (inherited from avatar)

                <Avatar background="decorative-green" size="medium">
                  <Text color="text-strong">
                    {datum.initials}
                  </Text>
                </Avatar>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

<Heading
level="2"
size='small'
margin={{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this margin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With margin="none"
image

without margin prop

image

>
{section.label}
</Heading>
<LinkNext height="xxlarge" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need the height

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligns icon height with heading line height using technique suggested in guidance

https://design-system.hpe.design/foundation/icons#aligning-with-text


<Paragraph alignSelf="top">{section.subtitle}</Paragraph>
</Card>
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we simplify code to be

export const SectionCard = ({ section, onClick }) => (
  <Card default onClick={() => onClick(section.id)} pad="xsmall">
    <Box align="center" direction="row" fill justify="between">
      <Heading level="2" size="small">
        {section.label}
      </Heading>
      <LinkNext />
    </Box>
    <Paragraph>{section.subtitle}</Paragraph>
  </Card>
);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adressed need for addtional props in points above

export const SectionCard = ({ section, onClick }) => (
  <Card default onClick={() => onClick(section.id)} pad="xsmall">
    <Box direction="row" fill justify="between">
      <Heading level="2" size="medium" margin="none">
        {section.label}
      </Heading>
      <LinkNext height="xlarge" />
    </Box>
    <Paragraph>{section.subtitle}</Paragraph>
  </Card>
);

@SeamusLeonardHPE
Copy link
Collaborator Author

@britt6612 added responses into all comments, if you can review modified code and resolve if deemed suitable.
Hopefully ready to pass to Matt for final approval.

const [selected, setSelected] = useState([]);

return (
<Box>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Box>

I dont think we need those boxes

const [selected, setSelected] = useState([]);

return (
<Box>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this box as well

@halocline halocline merged commit 9d98003 into master Feb 12, 2026
20 of 21 checks passed
@halocline halocline deleted the docs-ascending-navigation-update branch February 12, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Visual] Update Ascending navigation images

5 participants